home *** CD-ROM | disk | FTP | other *** search
- ` ------------------------------------------------------------------------
- ` BinaryCage DarkForge Snippet (6/8/2000)
- ` ------------------------------------------------------------------------
- ` 3D Effect simulating flying through an eternal wire-frame cage, which
- ` also swaps to a flow of binary digits now and again!
- ` This is pretty CPU intensive, so sorry if it's slow on your PC/gfx card!
-
- sync rate 0
- sync on
- hide mouse
-
- set text font "Courier Sans MS"
- set text size 48
-
- ` Make texture 1
-
- cls 0
- ink rgb(0,155,0),0
-
- text 0,0,"01011001010"
- text 0,48,"10110100110"
- text 0,96,"DARKFORGE"
- text 0,144,"01100110101"
- text 0,192,"01110100100"
-
- get image 1,0,0,256,256
-
- ` Make texture 2
-
- cls 0
-
- box 0,0,255,255
- ink rgb(0,0,0),0
- box 5,5,250,250
-
- get image 2,0,0,256,256
-
- ` Make the mesh
-
- make object cube 1,5
- make mesh from object 1,1
-
- z=0
-
- for a=1 to 10
- add limb 1,a,1
- offset limb 1,a,0,0,z
- inc z,5
- next a
-
- make mesh from object 2,1
- delete object 1
-
- ` Make objects
-
- MakeIt(1,0,0)
- MakeIt(2,5,0)
- MakeIt(3,10,0)
- MakeIt(4,0,5)
- MakeIt(5,5,5)
- MakeIt(6,10,5)
- MakeIt(7,0,10)
- MakeIt(8,5,10)
- MakeIt(9,10,10)
-
- ` Set the scene
-
- color backdrop rgb(0,0,0)
- set ambient light 100
- set camera range 1,250
-
- fog distance 50
- fog on
-
- position camera 5,5,-57
-
- ink rgb(255,255,255),0
-
- cz#=-30
-
- t=1 : change=timer()
-
- do
-
- move camera 0.25
- zrotate camera wrapvalue(x#)
-
- inc x#
-
- if camera position z()>cz#
-
- position camera 5,5,-50
-
- if flip=1
-
- if t=1
- t=2
- else
- t=1
- endif
-
- for a=1 to 9
- texture object a,t
- next a
-
- flip=0
-
- endif
-
- endif
-
-
- if timer()>=change+2000
- change=timer()
- flip=1
- endif
-
- sync
-
- loop
-
- function MakeIt(o,x,y)
-
- make object o,2,2
- rotate object o,180,0,0
- fix object pivot o
- set object o,1,0,1
- position object o,x,y,0
-
- endfunction
-
-